﻿Public Class Consultations

    ''' <summary>
    ''' Procedure d'archivage de la consultation (archive toute les lignes de la consultation + la consultation)
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub archiverConsultation()

        Me.LignesConsultations.Load()
        For Each ligne As LignesConsultations In Me.LignesConsultations
            ligne.Archive = True
        Next
        Me.FacturesReference.Load()
        If Me.Factures IsNot Nothing Then
            Me.Factures.archiverFacture()
        End If
        Me.Archive = True

    End Sub

    Public Function mesLignes() As List(Of LignesConsultations)

        If Not Me.EntityState = Data.EntityState.Added Then
            Me.LignesConsultations.Load()
        End If
        Return Me.LignesConsultations.ToList

    End Function

    Public Function monVeto() As Veterinaires

        Me.VeterinairesReference.Load()

        Return Me.Veterinaires

    End Function


End Class
